import engine.GameEngine;
import engine.GraphicsEngine;

public class Application {
    
    /** Variables de classe */
    private static boolean mc_graphicsEngine = true;

    /** Attributs */
    private GameEngine m_gameEngine;
    private GraphicsEngine m_graphicsEngine;
    
    /** Constructeurs */
    public Application() {
        m_gameEngine = new GameEngine();
        if (mc_graphicsEngine) m_graphicsEngine = new GraphicsEngine(m_gameEngine);
        else m_graphicsEngine = null;
    }

    /** Methodes */
    public void run() {
        m_gameEngine.start();
        if (mc_graphicsEngine) m_graphicsEngine.start();
    }
    
    /** Methodes de classe */
    public static void main(String[] args) {
        for (int i = 0; i < args.length; i++) {
            if (args[i].compareTo("--console") == 0) mc_graphicsEngine = false;
        }
		
        new Application().run();
    }
} 